package com.qfmy.model.entity.community;

import com.qfmy.model.entity.user.Users;
import io.swagger.v3.oas.annotations.media.Schema;
import jakarta.validation.constraints.NotBlank;
import jakarta.validation.constraints.Size;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import nonapi.io.github.classgraph.json.Id;


/**
 * @author 清风明月
 * @Package com.qfmy.model.entity
 * @date 2025/4/17
 * @description 博客实体类
 */
@Data
@AllArgsConstructor
@NoArgsConstructor
@SuppressWarnings("all")
public class Blog {
    @Schema(description = "博客的id")
    @Id
    private Integer id;

    @Schema(description = "博客的标题")
    @Size(max = 255)
    @NotBlank
    private String title;

    @Schema(description = "博客的类型")
    @Size(max = 255)
    @NotBlank
    private String type;

    @Schema(description = "博客的内容")
    private String content;

    @Schema(description = "博客的图像")
    private String image;

    @Schema(description = "发布的用户")
    private Integer userId;

    @Schema(description = "点赞量")
    private Integer likeCount ;

    @Schema(description = "阅读量")
    private Integer readCount ;

    @Schema(description = "评论量")
    private Integer commentCount ;

    @Schema(description = "创建时间")
    private String createTime;

    @Schema(description = "修改时间")
    private String updateTime;

    @Schema(description = "发布的用户")
    private Users user;
}